package com.example.activemq_demo2.com.mmall;

import org.apache.activemq.broker.BrokerService;

/**
 * @ClassName EmbedBroker
 * @Description TODO
 * @Author wushaopei
 * @Date 2019/12/25 9:53
 * @Version 1.0
 */
public class EmbedBroker {

    public static void main(String[] args) throws Exception {

        // ActiveMQ也支持在vm中通信基于嵌入式的broke
        BrokerService brokerService = new BrokerService();
        brokerService.setUseJmx(true);
        brokerService.addConnector("tcp://localhost:61616");
        brokerService.start();
    }
}
